package com.rtp2p.rtcoresdkdemo.add.wifi

import android.content.Context
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel
import com.rtp2p.rtcoresdkdemo.utils.RTWiFiUtils
import com.rtp2p.rtp2pcore.utils.RTLogUtils

class AddConfigWifiViewModel: ViewModel() {

    val ssid = MutableLiveData<String>()
    val pwd = MutableLiveData<String>().apply {
        value = "rt123456"
    }

    fun onStart(context: Context) {
        val value = RTWiFiUtils.getCurrentWiFiSSID(context)
        RTLogUtils.d("获取当前的ssid $value")
        ssid.value = value
    }
}